import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/components/Login'
import Index from '@/components/Index'
import User from '@/components/User'
import Dept from '@/components/Dept'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Login',
      component: Login
    },
    {
      path: '/index',
      name: 'Index',
      component: Index,
      children:[
        {
          path: '/User',
          name: 'User',
          component: User
        },
        {
          path: '/Dept',
          name: 'Dept',
          component: Dept
        },
      ]
    }
  ]
})
